<template>
	<view>
		<view class="wrapper disc jsa aic">
			<view class="schedule disc jsa aic">
				<view class="schedule-nav disc jsb aic">
					<text class="schedule-number color">{{schedule}}%</text>
					<text class="">资料完善度</text>
				</view>
			</view>
			<view class="">
				<view class="fw tac" v-if="schedule<20">您当前的资料不足，无法进行资产流动性测算</view>
				<view class="fw tac" v-if='schedule>=20'>您当前的资料完成度仅{{schedule}}%</view>
				<view class="edu fz12 fw color tac">完善资料有利于咨询结果！</view>
			</view>
			<view class="btn tac" @click="toLoan">完善资料</view>
			<view class="btn must tac" v-if="schedule>=5" @click="toSee">马上咨询</view>
		</view>
	</view>
</template>

<script>
	import { seeMyLimit } from '../../api/category';
	export default {
		data() {
			return {
				schedule:0,
				id:null,
				type:null,
			};
		},
		onLoad(option) {
			this.id = option.id
			this.type = option.type
			this.getNum()
		},
		methods:{
			//获取资料完整度
			getNum(){
				seeMyLimit().then(res => {
					this.schedule = res.data
				})
			},
			toLoan(){
				uni.navigateTo({
					url:"/pages/category/informationType"
				})
			},
			//额度评估
			toSee(){
				uni.navigateTo({
					url:`/pages/category/testLimit?id=${this.id}&type=${this.type}`
				})
			}
		}
	}
</script>

<style lang="scss">
.wrapper{
	height: 800rpx;
	.schedule{
		width: 350rpx;
		height: 350rpx;
		border-radius: 50%;
		border: 1px solid #ffa7a9;
		.schedule-nav{
			height: 160rpx;
			.schedule-number{
				font-size: 50px;
			}
		}
	}
	.colorb{
		color: blue;
	}
	.btn{
		width: 80%;
		line-height: 100rpx;
		border-radius: 50rpx;
		background-color: #1c77ff;
		color: #fff;
	}
	.must{
		background-color: #fff;
		border: 1px solid #1c77ff;
		color: #1c77ff;
	}
	.edu{
		margin: 20rpx 0;
	}
}
</style>
